package com.icode.dao.impl;

import com.icode.core.model.user.Member;
import com.icode.dao.MemberDao;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: xianfei
 * Date: 15-3-16
 * Time: 上午10:51
 * To change this template use File | Settings | File Templates.
 */
@Repository("memberDao")
public class MemberDaoImpl extends EntityDaoImpl implements MemberDao {


    @Override
    public List<Member> findMemberByMore(String sql) {
        String hql = "from " + Member.class.getName() + " a where '1'='1' " + sql;
        Query query = currentSession().createQuery(hql);
        return query.list();
    }
}
